// login module

import { makeAutoObservable, runInAction } from 'mobx'
import { http } from '@/utils'

export default class ChannelStore {
  channelList = []

  constructor() {
    makeAutoObservable(this)
  }

  loadChannelList = async () => {
    const res = await http('/channels')
    runInAction(() => {
      this.channelList = res.channels
    })
  }
}
